import React,{useState,useLayoutEffect}from "react"
const useTitleHooks = (title)=>{
  const [state,setState] = useState()
  useLayoutEffect(()=>{
    document.title = title
    setState(title)
  },[title])
  return state
}
export default useTitleHooks